package com.homework3;


import java.io.*;

public class demo {
    public static void main(String[] args) throws IOException {
        BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream("D:\\1.jpeg"), 8192);
        BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(new FileOutputStream("D:\\copy.jpeg"));
        int data;
        while ((data = bufferedInputStream.read()) != -1) {
            try {
                bufferedOutputStream.write(data);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
